package solution.tree;

public class TreeOps {

    private TreeNode root;

    public void setRoot(TreeNode root) {
        this.root = root;
    }

    public TreeNode getRoot() {
        return root;
    }

    public void preOrder(){
        if (root != null){
            this.root.pre();
        }
    }

    public TreeNode findByPre(long no){
        if (root != null){
            return this.root.findByPre(no);
        }
        return null;
    }

    public TreeNode findByMiddle(long no){
        if (root != null){
            return this.root.findByMiddle(no);
        }
        return null;
    }
    public TreeNode transfer(){
        return this.root.transfer(root);
    }

    public void print(){

    }
}
